﻿using Ipmce.RemoteVoting.Backend.DataAccess;

namespace Ipmce.RemoteVoting.Backend.VotingService.Utils
{
	class VoterRepositoryFactory : IVoterRepositoryFactory
	{
		private readonly string _connectionString;

		public VoterRepositoryFactory(string connectionString)
		{
			_connectionString = connectionString;
		}

		public IVoterRepositoryDisposable Create()
		{
			return new VoterRepositoryDisposable(new RemoteVotingContext(_connectionString));
		}
	}
}